


	** GENERATING SUMMARY TABLES ***
	 
	 	clear
		version 16.0
		set seed 1234
		set more off
		clear matrix
		clear mata

	 
	 
	*use "/Users/rich/Dropbox/research/Rich & Ferran/EBA turnout/data/turnout_eba_stdlag.dta", clear
	use "C:\Dropbox\Rich & Ferran\EBA turnout\data\turnout_eba_stdlag.dta" 
	
	set scheme lean1

	global dich "freq xlabel(0(1)1) ytitle("") ylabel(, angle(0) )"

	** 2 compulsory voting

		codebook comp
		sum comp
		tab year if comp~=.
		codebook ccode if comp~=.	
	
		hist comp, $dich  saving(v1 , replace)
		
	** 4 enpp_l (Lijphart 2012)
 
		codebook enpp_l
		sum enpp_l
		codebook  year if enpp_l~=.
		codebook ccode if enpp_l~=.
		
		  
	** 4 enpp (Golder)
 
		codebook enpp_s
		sum enpp_s
		codebook ccode if enpp_s~=.	
		codebook  year if enpp_s~=.
	
		hist enpp_s , freq   ytitle("") ylabel(, angle(0) ) saving(v2, replace)
		
	** 84 enpp squared (Golder)
 
		codebook enpp_sq_s
		sum enpp_sq_s
		codebook ccode if enpp_sq_s~=.	
		codebook  year if enpp_sq_s~=.
		hist enpp_sq_s , freq   ytitle("") ylabel(, angle(0) ) saving(v3, replace)
	
	** 5 PR (Golder)
		
		codebook pr
		sum pr
		codebook ccode if pr~=.	
		codebook  year if pr~=.
			
	** 7 concurrent (NELDA)
 
		sum concurrentsamedate
		codebook ccode if concurrentsamedate~=.	
		codebook  year if concurrentsamedate~=.
				
	** 9 Unicameralism (VDEM)	

		sum unicameral
		codebook ccode if unicameral~=.	
		codebook  year if unicameral~=.
			
	** 12 Disproportionality
	
		sum disprop_leg
		codebook ccode if disprop_leg~=.	
		codebook  year if disprop_leg~=.
		
	** 14 District Magnitude
		
		sum dist_mag
		codebook ccode if dist_mag~=.	
		codebook  year if dist_mag~=.
		
	** 15 Automatic registration	
	
		sum suffreg
		codebook ccode if suffreg~=.	
		codebook  year if suffreg~=.	
		
	** 18 	voting age
	
		sum votingage
		codebook ccode if votingage~=.	
		codebook  year if votingage~=.
		
	** 22 Federalism 	
		
		sum federalism
		codebook ccode if federalism~=.	
		codebook  year if federalism~=.
		
	** 24 share30to69ofVAP
		
		sum share30to69ofVAP
		codebook ccode if share30to69ofVAP~=.	
		codebook  year if share30to69ofVAP~=.
		
	** 25 plurality 	
		
		sum plurality
		codebook ccode if plurality~=.	
		codebook  year if plurality~=.		
	
	** 26 Majority
	
		sum majoritarian
		codebook ccode if majoritarian~=.	
		codebook  year if majoritarian~=.	
	
	** 27 Female sufferage
	
		sum sufferage
		codebook ccode if sufferage~=.	
		codebook  year if sufferage~=.	
		
	** 31 Mixed
	
		sum mixed
		codebook ccode if mixed~=.	
		codebook  year if mixed~=.	
		
	** 53 Govt fractionalisation
	
		sum party_frac
		codebook ccode if party_frac~=.	
		codebook  year if party_frac~=.	
		
	** 82 Size of leg
	
		sum leg_size_ln
		codebook ccode if leg_size_ln~=.	
		codebook  year if leg_size_ln~=.	
		
	* 3	Closeness/competitiveness
	
		sum competitive
		codebook ccode if competitive~=.	
		codebook  year if competitive~=.	
		
	*10	Polity 2
	
			sum polity2
		codebook ccode if polity2~=.	
		codebook  year if polity2~=.
	
	*10	Quality of Democracy
	
		sum qual_democ
		codebook ccode if qual_democ~=.	
		codebook  year if qual_democ~=.
		
	*28	Previous turnout (Voters)
	
		sum vt_lag
		codebook ccode if vt_lag~=.	
		codebook  year if vt_lag ~=.
		
	*28	Previous turnout (VAP)
		sum vapvt_lag
		codebook ccode if vapvt_lag~=.	
		codebook  year if vapvt_lag~=.	
		
	*38	# elections held
	
		sum num_elections
		codebook ccode if num_elections~=.	
		codebook  year if num_elections~=.	
		
	*39	New democracy
	
		sum new_democ
		codebook ccode if new_democ~=.	
		codebook  year if new_democ~=.	

	* 66	 2nd election
		sum election_2
		codebook ccode if election_2~=.	
		codebook  year if election_2~=.
		
	*49	3rd election
		sum election_3
		codebook ccode if election_3~=.	
		codebook  year if election_3~=.
		
	*50	4th election
		sum election_4
		codebook ccode if election_4~=.	
		codebook  year if election_4~=.
		
	*67	3rd & 4th election
		sum election_3_4
		codebook ccode if election_3_4~=.	
		codebook  year if election_3_4~=.
		
	*68	5th & 6th election
		sum election_5_6
		codebook ccode if election_5_6~=.	
		codebook  year if election_5_6~=.
		
	*102	7th & 8th
		sum election_7_8
		codebook ccode if election_7_8~=.	
		codebook  year if election_7_8~=.
		
	*70	Short term marjority status of govt
			sum maj_status
		codebook ccode if maj_status~=.	
		codebook  year if maj_status~=.
		
	*107	Terrorist attack
		sum ncount365i
		codebook ccode if ncount365i~=.	
		codebook  year if ncount365i~=.
		
	*105	Prior democratic experience
		sum dem_exp
		codebook ccode if dem_exp~=.	
		codebook  year if dem_exp~=.
		
	*127	Opposition harassment
		sum harassment
		codebook ccode if harassment~=.	
		codebook  year if harassment~=.
		
	*128	Opposition ban
		sum ban
		codebook ccode if ban ~=.	
		codebook  year if ban ~=.
		
	*129	Boycott
		sum boycott
		codebook ccode if boycott~=.	
		codebook  year if boycott~=.
		
	*130	Violence
			sum violence
		codebook ccode if violence~=.	
		codebook  year if violence~=.
		
	*65	Time since previous election
		sum prev_el_time
		codebook ccode if prev_el_time~=.	
		codebook  year if prev_el_time ~=.
		
	*80	1919-1944
		sum y1919_1994
		codebook ccode if y1919_1994~=.	
		codebook  year if y1919_1994~=.
		
	*81	1945-onwards
		sum post_ww2
		codebook ccode if post_ww2~=.	
		codebook  year if post_ww2~=.
		
	*59	Cumulative electorate size
		sum ln_vap
		codebook ccode if ln_vap~=.	
		codebook  year if ln_vap~=.
		
	*23	Linear time trend (1945=1)
			sum time_trend
		codebook ccode if time_trend~=.	
		codebook  year if time_trend~=.
		
	*47	Cumulative executive responsiveness		
		sum exec_response
		codebook ccode if exec_response~=.	
		codebook  year if exec_response~=.
		
	** Turnout (# voters)
		sum vt
		codebook ccode if vt~=.	
		codebook  year if vt~=.	
	
	** Turnout (% VAP)
		sum vapvt
		codebook ccode if vapvt~=.	
		codebook  year if vapvt~=.	
		
	
	*6 & 30	GNI
		sum gni_pc_constant
		codebook ccode if gni_pc_constant~=.	
		codebook  year if gni_pc_constant~=.
 
	*8	Population
		sum popl
		codebook ccode if popl~=.	
		codebook  year if popl~=.
		
	*13 & 60 GDP growth
		sum gni_pc_growth   
		codebook ccode if gni_pc_growth   ~=.	
		codebook  year if gni_pc_growth   ~=.
		
	*16	Urbanization
		sum urban_pop_pct
		codebook ccode if urban_pop_pct~=.	
		codebook  year if urban_pop_pct~=.
		
	*19	Literacy
		sum literacy
		codebook ccode if literacy~=.	
		codebook  year if literacy~=.
		
	*20	Inequality
		sum gini
		codebook ccode if gini~=.	
		codebook  year if gini~=.
		
	*29	Population density
		sum pop_density
		codebook ccode if pop_density~=.	
		codebook  year if pop_density~=.
		
	*32	Life expectancy (ave)
		sum life_exp
		codebook ccode if life_exp~=.	
		codebook  year if life_exp~=.
		
	*33	Public expenditure
		sum ggexp
		codebook ccode if ggexp~=.	
		codebook  year if ggexp~=.
		
	*37 & 48 Ethnic fractionalisation
		sum fract_ethnic
		codebook ccode if fract_ethnic~=.	
		codebook  year if fract_ethnic~=.
		
	*45	Human development index
		sum hdi_index
		codebook ccode if hdi_index~=.	
		codebook  year if hdi_index~=.
		
	*51	Inflation
		sum inflation
		codebook ccode if inflation~=.	
		codebook  year if inflation~=.
		
	*52	Unemployment
		sum unemployment
		codebook ccode if unemployment~=.	
		codebook  year if unemployment~=.
		
	*56	Unionisation
		sum unionisation
		codebook ccode if unionisation~=.	
		codebook  year if unionisation ~=.
		
	*58	Corruption
		sum cpi
		codebook ccode if cpi~=.	
		codebook  year if cpi~=.
		
	*75	Revenue decentralisation
		sum subnat_rev
		codebook ccode if subnat_rev ~=.	
		codebook  year if subnat_rev~=.
		
	*74	Spending decentralisation
		sum subnat_exp
		codebook ccode if subnat_exp~=.	
		codebook  year if subnat_exp~=.
		
	*101	OECD member
		sum oecd
		codebook ccode if oecd~=.	
		codebook  year if oecd~=.
		
	*106 Media exposure
			sum radios_pc_ln
		codebook ccode if radios_pc_ln~=.	
		codebook  year if radios_pc_ln~=.
		
	*114	Union density
		sum union_density
		codebook ccode if union_density~=.	
		codebook  year if union_density~=.
		
	*115	Economic globalisation
		sum econ_global
		codebook ccode if econ_global~=.	
		codebook  year if econ_global~=.
		
	*118	Islam majority nation
		sum islamic_majority
		codebook ccode if islamic_majority~=.	
		codebook  year if islamic_majority~=.
		
	*125	Linguistic fractionalisation
			sum fract_lang
		codebook ccode if fract_lang~=.	
		codebook  year if fract_lang~=.
		
	*126	Religious fractionalisation		
			sum fract_rel
		codebook ccode if fract_rel~=.	
		codebook  year if fract_rel~=.
		
	* 11 Switzerland
	
		sum  swiss
		codebook ccode if swiss~=.	
		codebook  year if swiss ~=.	
 
	* 21 USA
		
		sum  usa
		codebook ccode if usa ~=.	
		codebook  year if usa ~=.			
	
	* 40 Latin America

		sum  latin_america
		codebook ccode if  latin_america~=.	
		codebook  year if latin_america ~=.	
		hist latin_america, freq	
		
	* 41 Africa
		
		sum  africa
		codebook ccode if  africa~=.	
		codebook  year if  africa~=.	
		
	* 42 Asia
	
		sum  asia
		codebook ccode if  asia~=.	
		codebook  year if  asia~=.	
		
	* 43 Oceania
	
		sum  oceania
		codebook ccode if oceania ~=.	
		codebook  year if oceania ~=.	
		
	* 44 West
	
		sum  west
		codebook ccode if west ~=.	
		codebook  year if  west~=.	
	
	* 62 south america
	
		sum  samerica
		codebook ccode if samerica ~=.	
		codebook  year if  samerica~=.	
		
	* 77 Sweden
	
		sum  sweden
		codebook ccode if sweden ~=.	
		codebook  year if sweden ~=.	
		
	* 78 New Zealand
	
		sum  nz
		codebook ccode if nz ~=.	
		codebook  year if nz ~=.	
		
	* 79 Norway
	
		sum  norway
		codebook ccode if norway ~=.	
		codebook  year if norway ~=.	
		
	* 120 Eastern Europe
	
		sum  eeurope
		codebook ccode if eeurope ~=.	
		codebook  year if eeurope ~=.	
		
		
		
		
		
		
		
		
		
		
